<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator="layout">
<head>
    <title>收款设置</title>
    <script type="text/javascript">
	/*<![CDATA[*/
		var paySuccess=function(){
			alert("支付宝账号修改成功!");
			location.reload();
		};
		$(function() {
			setMenu("收款设置", true);
			var mTelCount = 60;
			$('#getAlipayTelCode').on('click', function() {
				if($('#getAlipayTelCode').data('isCount')) return;
				var phone = $('#alipayTel').val();
				$.post('getpaycode',{phone:phone});
				telCountTime();
			});
			function telCountTime() {
				mTelCount--;
				$('#getAlipayTelCode').data('isCount', true);
				$('#getAlipayTelCode').css('color','#FF6600');
				if(mTelCount <= 0) {
					$('#getAlipayTelCode').data('isCount', false);
					$('#getAlipayTelCode').val('重新获取');
					mTelCount = 60;
					return;
				}
				$('#getAlipayTelCode').val(mTelCount + 's重新获取');
				setTimeout(arguments.callee, 1000);
			};
			$('.changecolor').focus(function() {
	      	    $(this).css('border-color', '#FF6121');
	      	  }).blur(function() {
	      	    $(this).css('border-color', '');
	      	  });
		});
	/*]]>*/
	</script>
</head>
<body>
<div layout:fragment="content">
	<div class="detail">
		<div class="form-background" id="accountHtml">
			<div class="receivable-setting-item">
				<p style="font-size:18px;padding:20px;"><!-- 支付宝收款 --></p>
				<form id="receivable-form" class="receivable-form" action="javascript:submitData('receivable-form', 'savealipay', 'post', null, paySuccess)">
					<div class="form-group">
						<label for="alipayId" class="form-label-new">支付宝账号：</label>
						<input type="text" id="alipayId" name="payAccount" th:value="${data.payAccount}" class="input-newlarge changecolor" placeholder=""/>
					</div>
					<div class="form-group">
						<label for="alipayDockName" class="form-label-new">实名认证姓名：</label>
						<input type="text" id="alipayDockName" name="payName" th:value="${data.payName}" class="input-newlarge changecolor" placeholder=""/>
					</div>
					<div class="form-line" style="margin: 25px 15px 25px 0;"></div>
					<div class="form-group">
						<label for="alipayTel" class="form-label-new">绑定手机号：</label>
						<input type="text" id="alipayTel" class="input-newlarge changecolor" readonly="readonly" th:value="${data.phone}" placeholder=""/>
						<p class="tip">为保证收款安全，每次修改收款设置时，请输入从账号绑定的手机上获取的验证码。</p>
					</div>
					<div class="form-group">
						<label class="form-label-new">短信验证码：</label>
						<input type="text" id="alipayTelCode" name="code" class="input-new changecolor" placeholder=""/>
						<input type="button" id="getAlipayTelCode" class="input-get1" value="获取验证码"/>
					</div>
					<div class="form-group">
						<label class="form-label-w-112"></label>
						<input type="submit" value="确认提交" class="input-submit-03"/>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
</body>
</html>